/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: jse2204 - Ex2
 * <p>Powered by webrx On 2022-08-29 17:12:12
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex2 {
    public static void main(String[] args) {
        int a = 10;
        int b = 5;
        if (args.length == 2) {
            a = Integer.parseInt(args[0]);
            b = Integer.parseInt(args[1]);
        }
        //System.out.printf("%2d ÷ %2d = %2d", a, b, a / b);
        if (a % b == 0) {
            System.out.printf("%2d ÷ %2d = %2d", a, b, a / b);
        } else {
            //System.out.printf("%2d ÷ %2d = %d ... %d", a, b, a / b, a % b);
            System.out.printf("%2d ÷ %2d = %.2f", a, b, 1.0 * a / b);
        }
    }
}
